home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / nvlexp / global.bas < prev    next >
Encoding:
BASIC Source File  |  1992-02-02  |  4.5 KB  |  85 lines

  1. DefInt A-Z
  2.  
  3. Global CrLf$                    ' Now just have to set it once
  4. Global FileServerNames$()       ' Array for 8 possible names
  5. Global WorkingServers$()        ' Array of all active servers
  6. Global ArrayUnMap$()            ' All unmapped drives
  7. Global Abort%                   ' Way to pass parameters
  8.  
  9. ' --------------------------------------------------------
  10. ' ----- Visual Basic Constants ---------------------------
  11. ' --------------------------------------------------------
  12. Global Const TRUE = -1
  13. Global Const FALSE = 0
  14.  
  15.  
  16. ' --------------------------------------------------------
  17. ' ----- Windows API Declares -----------------------------
  18. ' --------------------------------------------------------
  19. Global Const WM_USER = &H400
  20. Global Const LB_RESETCONTENT = WM_USER + 5
  21. Global Const ES_PASSWORD = &H20
  22. Global Const EM_SETPASSWORD = 1052
  23. Global Const GWL_STYLE = -16
  24. Global Const ASTERICK = 42
  25. Global Const EM_LIMITTEXT = WM_USER + 21
  26.  
  27. Declare Function GetModuleHandle% Lib "Kernel" (ByVal ModuleName$)
  28. Declare Function GetModuleUsage% Lib "Kernel" (ByVal hModule%)
  29. Declare Function SendMessage Lib "User" (ByVal hWnd%, ByVal msg%, ByVal wp%, lp As Any) As Long
  30. Declare Function GetFocus Lib "User" () As Integer
  31. Declare Function GetWindowLong Lib "User" (ByVal hWnd%, ByVal nIndex%) As Long
  32. Declare Function SetWindowLong Lib "User" (ByVal hWnd%, ByVal nIndex%, ByVal NewLong&) As Long
  33.  
  34. ' --------------------------------------------------------
  35. ' ----------------- Novell API Declares ------------------
  36. ' --------------------------------------------------------
  37.  
  38. Declare Function GetDLLVersion Lib "NWCore.DLL" (ByVal DLLName As String, MajorVer%, MinorVer%, RevLevel%, BetaLevel%) As Integer
  39. Declare Function GetConnectionID Lib "NWWrkstn.DLL" (ByVal FileServerName As String, ConnectionID%) As Integer
  40. Declare Function GetDefaultConnectionID Lib "NWWrkstn.DLL" () As Integer
  41. Declare Function GetPrimaryConnectionID Lib "NWWrkstn.DLL" () As Integer
  42. Declare Function AttachToFileServer Lib "NWConn.DLL" (ByVal ServerName As String, ConnectID%) As Integer
  43. Declare Sub SetPreferredConnectionID Lib "NWWrkstn.DLL" (ByVal ConnectID%)
  44. Declare Sub SetPrimaryConnectionID Lib "NWWrkstn.DLL" (ByVal ConnectID%)
  45. Declare Function LoginToFileServer Lib "NWConn.DLL" (ByVal LoginID$, ByVal ObjectType%, ByVal Password$) As Integer
  46. Declare Sub LogoutFromFileServer Lib "NWConn.DLL" (ByVal ConnectionID%)
  47. Declare Sub DetachFromFileServer Lib "NWConn.DLL" (ByVal ConnectionID%)
  48. Declare Function GetConnectionNumber Lib "NWConn.DLL" () As Integer
  49. Declare Function MapDrive Lib "NWDir.DLL" (ByVal ConnectID%, ByVal DriveNo%, ByVal DPath As String, ByVal SearchFlag%, ByVal SearchOrder%, ByVal DLetter As String) As Integer
  50. Declare Sub GetFileServerName Lib "NWServer.DLL" (ByVal ConnectID%, ByVal FileServerName As String)
  51. Declare Sub GetStationAddress Lib "NWConn.DLL" (Addr&)
  52. Declare Function GetConnectionInformation Lib "NWConn.DLL" (ByVal ConnectNo&, ByVal ObjectName$, ObjectType%, ObjectID&, ByVal LoginTime$) As Integer
  53. Declare Function ScanBinderyObject Lib "NWBind.DLL" (ByVal SearchObjName$, ByVal SearchObjectType%, ObjectID&, ByVal ObjectName$, ObjectType%, HasProperties%, ObjectFlag%, ObjectSec%) As Integer
  54. Declare Function GetDriveInformation Lib "NWDIR.DLL" (ByVal DriveNo%, ConnectionID%, DirectoryHandle%) As Integer
  55. Declare Function GetDirectoryPath Lib "NWDir.DLL" (ByVal DirectoryHandle%, ByVal DirectoryPath$) As Integer
  56.  
  57. ' --------------------------------------------------------
  58. ' ----------------- Novell Constants ---------------------
  59. ' --------------------------------------------------------
  60.                                         
  61. ' Bindery object type definitions
  62. Global Const OT_WILD = -1               ' Matches any type
  63. Global Const OT_UNKNOWN = 0             ' Unknown object type
  64. Global Const OT_USER = 1                ' The object is a "user"
  65. Global Const OT_USER_GROUP = 2          ' A group of users
  66. Global Const OT_PRINT_QUEUE = 3         ' Services print queues
  67. Global Const OT_FILE_SERVER = 4         ' The object serves files
  68. Global Const OT_JOB_SERVER = 5
  69. Global Const OT_GATEWAY = 6
  70. Global Const OT_PRINT_SERVER = 7
  71. Global Const OT_ARCHIVE_QUEUE = 8
  72. Global Const OT_ARCHIVE_SERVER = 9      ' Services backup jobs
  73. Global Const OT_JOB_QUEUE = 10
  74. Global Const OT_ADMINISTRATION = 11
  75. Global Const OT_REMOTE_BRIDGE_SERVER = 38
  76.  
  77. Global Const DRIVE_ADD = 1
  78. Global Const DRIVE_INSERT = 2
  79. Global Const DRIVE_DELETE = 3
  80. Global Const MAX_NETWARE_SEARCH_DRIVES = 16
  81.  
  82. Global Const BF_STATIC = 0
  83. Global Const BF_DYNAMIC = 1
  84.  
  85.